package com.core.model;

import com.alibaba.fastjson.JSON;

/**
 * Created with IntelliJ IDEA.
 *
 * @author lxf
 * @date 2018/8/1 20:47
 * To change this template use Editor | File and Code Templates.
 */
public class Type2 {

    private Integer id;
    private String type;

    public Type2(Integer id, String type) {
        this.id = id;
        this.type = type;
    }

    public boolean pipei(Type1 type1) {
        if (type1.getName().equals(this.getType())) {
            return true;
        }
        return false;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
